<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="text" placeholder="姓名">
<input type="text" placeholder="工资">
<input type="text" placeholder="工作">
<input type="button" value="添加">

<table border="1">
    <caption>员工列表</caption>
    <tr>
        <th>员工姓名</th>
        <th>工资</th>
        <th>工作</th>
        <th>操作</th>
    </tr>
</table>
<script src="jquery.min.js"></script>
<script>
   /* let d=$("<div>我是div</div>");
    $("body").append(d);*/
   $("input:last").click(function () {
       let tr=$("<tr></tr>");
       let nameTd=$("<td></td>");
       let salaryTd=$("<td></td>");
       let jobTd=$("<td></td>");
       let delTd=$("<td><input type='button' value='删除'></td>")
       delTd.children().click(function () {
           tr.remove();
       })
       nameTd.text($("input:eq(0)").val());
       salaryTd.text($("input:eq(1)").val());
       jobTd.text($("input:eq(2)").val());
       tr.append(nameTd);
       tr.append(salaryTd);
       tr.append(jobTd);
       tr.append(delTd)
       $("table").append(tr);
   })
</script>
</body>
</html>